<script src="./change-password.component.js"></script>
<style src="./change-password.scss" lang="scss" scoped></style>
<template>
  <div>
    <el-dialog title="修改密码" class="search-dialog" :show-close="showClose" :visible.sync="showDialog" width="800px">
      <el-form ref="dataForm" :model="loginForm" :rules="loginRules" class="aq-padding-20 aq-padding-bottom-0">
        <el-form-item prop="oldPassword">
          <el-input ref="password" prefix-icon="el-icon-lock" v-model="loginForm.oldPassword" name="password" :type="passwordType" placeholder="请输入旧密码">
            <svg-icon slot="suffix" :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" class="aq-margin-right-12" @click="showPwd" />
          </el-input>
        </el-form-item>

        <el-form-item prop="newPassword">
          <el-input ref="passwordNew" prefix-icon="el-icon-lock" v-model="loginForm.newPassword" name="password" minlength="6" :type="passwordTypeNew" placeholder="请输入新密码">
            <svg-icon slot="suffix" :icon-class="passwordTypeNew === 'password' ? 'eye' : 'eye-open'" class="aq-margin-right-12" @click="showNewPwd" />
          </el-input>
        </el-form-item>

        <el-form-item prop="newPassword2">
          <el-input ref="passwordNew2" prefix-icon="el-icon-lock" v-model="loginForm.newPassword2" name="password" minlength="6" :type="passwordTypeNew2" placeholder="请输入确认新密码">
            <svg-icon slot="suffix" :icon-class="passwordTypeNew2 === 'password' ? 'eye' : 'eye-open'" class="aq-margin-right-12" @click="showNewTwoPwd" />
          </el-input>
        </el-form-item>

        <div class="aq-padding-16 text-center">
          <el-button :loading="loading" type="primary" class="login-btn" @click.native.prevent="handleLogin">
            确认修改
          </el-button>
        </div>

      </el-form>
    </el-dialog>
  </div>

</template>

